home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / space_bo.swf / scripts / DefineSprite_182 / frame_4 / DoAction.as
Encoding:
Text File  |  2010-11-09  |  614 b   |  25 lines

  1. this._x += _parent._parent.speed + moveX;
  2. this._y -= moveY;
  3. moveY -= 0.5;
  4. ricicleX = _parent.distance + this._x;
  5. rikDX = _parent._parent.rik._x - ricicleX;
  6. rikDY = _parent._parent.rik._y - (380 + this._y);
  7. if(rikDX < 10 and rikDX > -60 and rikDY < 15 and rikDY > -65)
  8. {
  9.    _parent._parent.riciclesCollected = _parent._parent.riciclesCollected + 1;
  10.    nextFrame();
  11. }
  12. else if(hitTest(_parent._parent.alien))
  13. {
  14.    _parent._parent.alien.anim.ricicle.gotoAndPlay(2);
  15.    gotoAndStop(1);
  16. }
  17. else if(this._y > 425 or ricicleX < -25 or ricicleX > 575)
  18. {
  19.    gotoAndStop(1);
  20. }
  21. else
  22. {
  23.    prevFrame();
  24. }
  25.